import { post } from '@/utils/request'
// 文章管理
// 列表
export const pageList = p => post(`/service-content/b/article/v1/pageList`, p)
// 列表 select
export const pageSelList = p => post(`/service-content/b/article/v1/list`, p)
// 删除
export const pageDel = p => post(`/service-content/b/article/v1/del/${p}`, p, 'get')
// 公开状态
export const changeStatus = p => post(`/service-content/b/article/v1/changeStatus/${p.id}/${p.publishStatus}`, p, 'get')
// 置顶状态
export const changePutTopStatus = p => post(`/service-content/b/article/v1/changePutTopStatus/${p.id}/${p.putTopStatus}`, p, 'get')
// 查看
export const pageDetails = p => post(`/service-content/b/article/v1/view/${p}`, p, 'get')
// 修改 保存
export const modifySave = p => post(`/service-content/b/article/v1/modify`, p)
// 新增 保存
export const addSave = p => post(`/service-content/b/article/v1/add`, p)

// 评论管理
// 列表
export const commentList = p => post(`/service-content/b/article/v1/comment/pageList`, p)
// 状态
export const commentStatus = p => post(`/service-content/b/article/v1/comment/changeStatus/${p.id}/${p.publishStatus}`, p, 'get')

// 分组管理
// 列表
export const groupList = p => post(`/service-content/b/article/v1/group/pageList`, p)
// 列表 select
export const groupSelList = p => post(`/service-content/b/article/v1/group/list`, p)
// 查看
export const groupDetails = p => post(`/service-content/b/article/v1/group/view/${p}`, p, 'get')
// 修改 保存
export const groupModifySave = p => post(`/service-content/b/article/v1/group/modify`, p)
// 新增 保存
export const groupAddSave = p => post(`/service-content/b/article/v1/group/add`, p)
// 删除
export const groupDel = p => post(`/service-content/b/article/v1/group/del/${p}`, p, 'get')

// 作者管理
// 列表
export const authorList = p => post(`/service-content/b/article/v1/author/pageList`, p)
// 列表 select
export const effectiveList = p => post(`/service-content/b/article/v1/author/list`, p)
// 状态
export const authorStatus = p => post(`/service-content/b/article/v1/author/changeStatus/${p.id}/${p.publishStatus}`, p, 'get')
// 查看
export const authorDetails = p => post(`/service-content/b/article/v1/author/view/${p}`, p, 'get')
// 修改 保存
export const authorModifySave = p => post(`/service-content/b/article/v1/author/modify`, p)
// 新增 保存
export const authorAddSave = p => post(`/service-content/b/article/v1/author/add`, p)
// 删除
export const authorDel = p => post(`/service-content/b/article/v1/author/del/${p}`, p, 'get')

// 基本设置
// 查看
export const settingView = p => post(`/service-system/b/articleSetting/v1/viewArticleSetting`, p)
// 保存
export const settingSave = p => post(`/service-system/b/articleSetting/v1/saveArticleSetting`, p)
